1. Field of the Invention
The present invention relates to a sound reproducing system and sound reproducing method for decoding audio data included in a bit stream of an input audio signal.
2. Description of Related Art
FIG. 13 is a block diagram showing a configuration of a conventional sound reproducing system disclosed in Japanese patent application laid-open No. 10-13238/1998, for example. In FIG. 13, the reference numeral 1 designates a sync-pattern detector that detects a synchronization pattern at the initial position of each unit frame constituting a bit stream, and produces a synchronization pattern detection signal; 2 designates a frame counter that starts a count processing, when receiving the synchronization pattern detection signal from the sync-pattern detector 1, increments its count value each time it receives the unit frame constituting the bit stream, and outputs the count value as a frame position signal; and 3 designates a synchronization detector that makes a decision as to whether a synchronization state is continued or not on the basis of the output timing of the synchronization pattern detection signal produced from the sync-pattern detector 1, and the output timing of the frame position signal output from the frame counter 2, and outputs a synchronization detection signal in the synchronization state, or a synchronization detection error signal in an asynchronous state.
The reference numeral 4 designates a data error check block that checks data error of an audio signal in the unit frame with reference to an error check pattern in the unit frame, and outputs a data error signal when detecting the data error; and 5 designates a frame error check block that produces a frame error signal when the synchronization detector 3 outputs the synchronization detection error signal and the data error check block 4 outputs the data error signal, thereby causing the decoding of the audio data to be suspended, and that when the data error check block 4 does not output the data error signal, causes the decoding of the audio data to be continued even if the synchronization detector 3 outputs the synchronization detection error signal.
Next, the operation of the conventional sound reproducing system will be described.
First, receiving the bit steam from an input terminal, the sync-pattern detector 1 detects the synchronization pattern at the initial position of each unit frame constituting the bit stream (see, FIG. 14). When the sync-pattern detector 1 detects the synchronization pattern, it supplies the synchronization pattern detection signal to the frame counter 2 and synchronization detector 3.
Receiving the synchronization pattern detection signal from the sync-pattern detector 1, the frame counter 2 starts counting and increments the count value every time it receives the unit frame, and supplies the synchronization detector 3 with the count value as the frame position signal for identifying the position of the unit frame.
Thus, when the sync-pattern detector 1 outputs the synchronization pattern detection signal and the frame counter 2 outputs the frame position signal, the synchronization detector 3 monitors whether the output timings of the two signals agree or not. If they agree, the synchronization detector 3 makes a decision that the synchronization state is held, and supplies the synchronization detection signal to the frame counter 2 and data error check block 4. In contrast, if they disagree, the synchronization detector 3 makes a decision that the asynchronous state takes place, and supplies the synchronization detection error signal to the frame error check block 5.
On the other hand, receiving the bit stream from the input terminal, the data error check block 4 checks whether a data error takes place in the audio data in the unit frame with reference to the error check pattern included in the unit frame (see, FIG. 14), and supplies the data error signal to the frame error check block 5 if it detects the data error.
When the synchronization detector 3 outputs the synchronization detection error signal and the data error check block 4 detects the data error signal, the frame error check block 5 produces the frame error signal to cause the decoding of the audio data to be suspended. In contrast, when the data error check block 4 does not output the data error signal, the frame error check block 5 does not outputs the frame error signal and causes the decoding of the audio data to be carried out even if the synchronization detector 3 outputs the synchronization detection error signal, because the audio data itself is correct in this case.
With such a configuration, the conventional sound reproducing system can continue decoding the audio data as long as the audio data is correct even if the system is brought into the asynchronous state. However, when the unit frames which do not include the error check pattern are input, the correctness of the audio data cannot be checked. In this case, if the synchronization detector 3 outputs the synchronization detection error signal, the audio data cannot be decoded even if the audio data is correct, thereby resulting in a problem of causing an interruption of sound. As an example of the unit frames that do not include the error check pattern, some types of unit frames are known constituting the bit stream which is encoded according to an MPEG audio encoding system.
The present invention is implemented to solve the foregoing problem. It is therefore an object of the present invention to provide a sound reproducing system and sound reproducing method capable of decoding the audio data as long as the audio data is correct, even if the detection of a syncword fails.
According to a first aspect of the present invention, there is provided a sound reproducing system comprising: detection means for detecting a syncword included in each frame constituting a bit stream; re-detection means for detecting, when the detection means fails in detecting the syncword, a syncword included in a subsequent frame; checking means for checking, when the re-detection means succeeds in detecting the syncword, correctness of bit stream information included in the subsequent frame; and decoding means for decoding, when the checking means verifies the correctness of the bit stream information, audio data in the frame with which the detection means fails to detect the syncword.
Here, the checking means may carry out CRC (cyclic redundancy check) when the frame includes CRC data, and the decoding means may halt decoding of audio data when the checking means detects a CRC error.
The sound reproducing system may further comprise error processing means for executing an error processing when the re-detection means fails in detecting the syncword.
The sound reproducing system may further comprise error processing means for executing an error processing when the checking means denies the correctness of the bit stream information.
The detection means may detect the syncword in the present frame with reference to previous bit stream information whose correctness is verified by the checking means.
The re-detection means may detect the syncword in the subsequent frame with reference to previous bit stream information whose correctness is verified by the checking means.
The re-detection means may detect, if the detection means fails to detect the syncword in the present frame, the syncword in the subsequent frame with reference to bit stream information extracted from the present frame.
The re-detection means may detect the syncword in the subsequent frame by searching a predetermined range in which the syncword is likely to be present.
According to a second aspect of the present invention, there is provided a sound reproducing method comprising the steps of: carrying out a detection processing of a syncword included in each frame constituting a bit stream; carrying out, if the syncword cannot be detected, a detection processing of a syncword included in a subsequent frame; checking, when the syncword included in the subsequent frame is detected, correctness of bit stream information included in the subsequent frame; and decoding, when the correctness of the bit stream information included in the subsequent frame is verified, audio data in the frame with which the detection of the syncword fails.
The sound reproducing method may further comprise the steps of carrying out CRC (cyclic redundancy check) when the frame includes CRC data, and halting decoding the audio data in the frame if a CRC error is detected.
The sound reproducing method may further comprise the step of carrying out an error processing if the syncword cannot be detected in the subsequent frame.
The sound reproducing method may further comprise the step of carrying out an error processing if the correctness of the bit stream information is denied.